home *** CD-ROM | disk | FTP | other *** search
XSetup plugin | 1999-06-26 | 2.0 KB | 82 lines |
- "FILE"="Xteq Systems X-Setup Plugin 5.0"
- "TYPE"="1"
- "COUNT"="4"
- "UIPATH"="Appearance\Explorer\Files"
- "NAME"="*.DOC Commands"
- "VERSION"="1.0"
- "LANGUAGE"="VBScript"
- "TEXT 1"="(1) Name"
- "TEXT 2"="(1) Command"
- "TEXT 3"="(2) Name"
- "TEXT 4"="(2) Command"
- "DESCRIPTION 1"="The extension DOC (*.DOC) is used by many programs such as Microsoft Word and WordPad and others as well."
- "DESCRIPTION 2"="This plug-in will allow you to specify which program(s) you wish to use when opening files with the .DOC extension."
- "DESCRIPTION 3"="To remove the command(s), clear both the "Name" and the "Command" field and press "Apply"."
- "AUTHOR"="Xteq Systems"
- "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
- "COMMENT 1"="For more information, go to http://www.xteq.com or write to TeXHeX@xteq.com."
-
-
- sPathBase="HKCR\.doc\@"
-
- sPath1="" 'set later through code
- sPath2="" 'dito
-
- sCMD="Command\@" '*** this is always the same
-
- Sub Plugin_Initialize
- ' First check where this stuff goes to
- s=RegReadValue(sPathBase)
- if IsEmpty(s)=true then
- 'nothing found - we'll stick with .DOC
- s=".doc"
- end if
- sPath1="HKCR\" & s & "\Shell\XQXSETCMD1\"
- sPath2="HKCR\" & s & "\Shell\XQXSETCMD2\"
-
-
- Call ReadStuff(sPath1,1)
- Call ReadStuff(sPath2,3)
- End Sub
-
- Sub ReadStuff(Path,UIStart)
- s=RegReadValue(Path & sCMD)
- if len(s)>0 then
- s=RegReadValue(Path & "@")
- SetUIElement UIStart,s
-
- s=RegReadValue(Path & sCMD)
- SetUIElement UIStart+1,s
- end if
-
- end sub
-
-
- Sub Plugin_CheckData(ElementIndex)
- End Sub
-
- Sub Plugin_Apply(ElementIndex,ElementSubIndex)
- Call WriteStuff(sPath1,1)
- Call WriteStuff(sPath2,3)
- End Sub
-
- Sub WriteStuff(Path,UIStart)
- s1=GetUIElement(UIStart)
- s2=GetUIElement(UIStart+1)
-
-
- if len(s1)>0 or len(s2)>0 then
- Call RegWriteValue(Path & sCMD,s2,1)
- Call RegWriteValue(Path & "@",s1,1)
- else
- if IsEmpty(RegReadValue(Path & sCMD))=false then
- Call RegDeletePath(Path & "Command")
- Call RegDeletePath(Path)
- end if
- end if
-
- End Sub
-
- Sub Plugin_Terminate
- End Sub
-